Skip to content

feat(sidebar): folder management in by-project mode#3134

Closed
MattPua wants to merge 1 commit into
mainfrom
posthog-code/sidebar-folder-management
Closed

feat(sidebar): folder management in by-project mode#3134
MattPua wants to merge 1 commit into
mainfrom
posthog-code/sidebar-folder-management

Conversation

@MattPua

@MattPua MattPua commented Jul 3, 2026

Copy link
Copy Markdown
Member

Problem

No way to add/remove folders from the sidebar, and folders without tasks were invisible even in by-project mode.

Changes

  • Folders without tasks now appear as empty groups in by-project mode with a "No agents yet" placeholder
  • Right-click a folder header to remove it (or open in external app)
  • Add folder button in the tasks header opens the native OS directory picker
  • Extracted folderGroupId helper so folder↔group matching logic lives in one place

How did you test this?

Manual testing in the app.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@trunk-io

trunk-io Bot commented Jul 3, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 0526dd3.

@MattPua

MattPua commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

Duplicate of #3133

@MattPua MattPua marked this as a duplicate of #3133 Jul 3, 2026
@MattPua MattPua closed this Jul 3, 2026
@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff (1)

  1. packages/core/src/sidebar/groupTasks.ts, line 93-107 (link)

    P2 Name disambiguation silently fails for empty folder groups

    The disambiguation loop uses group.tasks[0]?.repository?.organization to build a prefixed name, but for empty folder groups (created in the new allFolders loop), tasks is empty so organization is always undefined. If two registered folders share the same display name — e.g., /home/alice/posthog and /home/bob/posthog both named "posthog" — both will appear in the sidebar with the identical label and no way to tell them apart.

Reviews (1): Last reviewed commit: "feat(sidebar): add folder context menu a..." | Re-trigger Greptile

<MenuLabel className="flex items-center justify-between pt-0 pr-0 pb-0.5">
Tasks
<span className="flex items-center">
<AddFolderButton />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Add folder button visible in modes where it has no visible effect

AddFolderButton is rendered unconditionally, but the added folder only appears as a sidebar group when organizeMode === "by-project". In "Chronological list" mode a user clicking this button will see no change in the UI (there's no success toast and the sidebar layout is unchanged), which makes the action appear broken. The button could be hidden or disabled when not in by-project mode, or a success toast could indicate the folder was added and becomes visible in by-project view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant